<!--点击退房打开的页面-->

<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="/static/h-ui.admin/css/bootstrap.min.css">

    <script src="/static/js/jquery-1.8.3.js" th:src="@{/static/js/jquery-1.8.3.js}"></script>

    <title>用户管理</title>
</head>
<style>
    #all{
        width: 300px;
        height: 300px;
        margin: 0px auto;
    }
</style>
<body th:fragment="member-list">
<div id="all">

    <div>
        <h3>住房时长/小时：  <span th:text="${session.time2}"></span></h3>
    </div>

    <div>
        <h3>住房天数/天：    <span th:text="${session.time}"></span></h3>
    </div>

    <div>
        <h3>房间金额/天：    <span th:text="${session.dayMoney}"></span></h3>
    </div>
    <div>
        <h3>预收金额/元：    <span th:text="${session.mm}"></span></h3>
    </div>
    <div>
        <h3>实收金额：    <input type="text" id="recordMoney" name="recordMoney" style="width: 80px">元</h3>
    </div>

    <div style="margin-top: 50px">
        <button type="button" id="saveBtn" class="btn btn-success">结账</button>
        <button type="button" id="cancelBtn" class="btn btn-default">取消</button>
    </div>
</div>
</body>
<script>

    $("#saveBtn").click(function () {
        $.ajax({
            type: 'post',
            dataType: 'json',
            url: '/room/toSettleAccounts',
            data: {
                recordMoney:$("#recordMoney").val()
            },
            success:function () {
                $("#cancelBtn").click();
            }
        }) ;
    });
    var quxiao=function(){
        var index=parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    }

    $("#cancelBtn").click(function () {
        quxiao();
    })

</script>
</html>